//
// Created by yan on 6/14/17.
//

#ifndef YUNBADEMO_YUNBA_SERVER_H
#define YUNBADEMO_YUNBA_SERVER_H

#include "yunba.h"
#include <iostream>

using namespace std;

class yunba_server {
public:
    yunba_server(MQTTClient_messageArrived *m,MQTTClient_extendedCmdArrive *,string keystring = "590be540f1ae5ffe367124fe");
    int connect();
    int setup(void);

private:
    string appkey ;
    MQTTClient_connectOptions conn_opts = MQTTClient_connectOptions_initializer;
    char *deviceid = NULL;
    REG_info my_reg_info;
    MQTTClient client;
    MQTTClient_messageArrived * callbackmessage;
    MQTTClient_extendedCmdArrive * callbackextened;
};


#endif //YUNBADEMO_YUNBA_SERVER_H
